<template>
	<p>艺术家 {{ artist }}</p>
	<list-tpl :table-data="tableData" disableSearch="artist" />
</template>

<script lang="ts" setup>
import { ref } from "vue";
import listTpl from "../common/list-tpl.vue";
import { useMP3RouteData } from "@/utils/useMP3";
import { fetchMP3List, IMP3Data } from "@/utils/useRequest";

const { artist } = useMP3RouteData();
const tableData = ref([] as IMP3Data[]);

fetchMP3List({ artist: artist.value }).then(({ data }) => {
	tableData.value = data;
});
</script>
